package com.ngc.mall.core.enumeration;

import java.util.stream.Stream;

/**
 *
 * 积分类型
 * @author: chenxiaolin
 * @date 2023/9/12 10:05
**/

public enum IntegralType {
    SIGN(1,"签到"),
    CONTINUOUS_SIGN(2,"连续签到"),
    WELFARE_TASK(3,"福利任务"),
    DAILY_TASK(4,"日常任务"),
    RETROACTIVE_SIGN(5,"补签"),
    EXCHANGE(6,"兑换商品");

    private Integer value;

    IntegralType(int value,String description) {
        this.value=value;
    }

    public Integer getValue(){
        return this.value;
    }

    public static IntegralType toType(int value){
        return Stream.of(IntegralType.values()).filter(c->c.value==value).findAny().orElse(null);
    }
}
